package com.example.cloudconsumerzkorder80.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author chensixiang chensixiang1234@gmail.com
 */
@RestController
@RequestMapping("/consumer")
@RequiredArgsConstructor
public class OrderController {

    private final RestTemplate restTemplate;
    public static final String URL = "http://cloud-payment-service";

    @GetMapping("/zk")
    public String zk() {
        return restTemplate.getForObject(URL + "/payment/zk", String.class);
    }

}
